package com.jinkeen.xiaxie

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.jinkeen.xiaxie.activiity.BreathLightActivity
import com.jinkeen.xiaxie.activiity.DeviceInfoActivity
import com.jinkeen.xiaxie.anim.AnimActivity
import com.jinkeen.xiaxie.anim.Anmi2Activity
import com.jinkeen.xiaxie.banner.BannerActivity
import com.jinkeen.xiaxie.chatRoom.ChatRoomMainActivity
import com.jinkeen.xiaxie.databinding.ActivityMainBinding
import com.jinkeen.xiaxie.keyboard.PasswordEditActivity
import com.jinkeen.xiaxie.loading.LoadingActivity
import com.jinkeen.xiaxie.pictureInPicture.PictureInPictureActivity
import com.jinkeen.xiaxie.pictureInPicture.TwoScreenActivity
import com.jinkeen.xiaxie.qrCode.QrCodeActivity
import com.jinkeen.xiaxie.rainEmoji.RainEmojiActivity
import com.jinkeen.xiaxie.recycleview.MyRecycleViewActivity
import com.jinkeen.xiaxie.rxKotlin.RxKotlinTestActivity
import com.jinkeen.xiaxie.test.ChildrenActivity
import com.jinkeen.xiaxie.viewPager2.ViewPager2Activity

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)
        binding.anim.setOnClickListener {
            startActivity(Intent(this, AnimActivity::class.java))
        }
        binding.anim2.setOnClickListener {
            startActivity(Intent(this, Anmi2Activity::class.java))
        }
        binding.chatRoom.setOnClickListener {
            startActivity(Intent(this, ChatRoomMainActivity::class.java))
        }
        binding.viewpager2.setOnClickListener {
            startActivity(Intent(this, ViewPager2Activity::class.java))
        }
        binding.loading.setOnClickListener {
            startActivity(Intent(this, LoadingActivity::class.java))
        }
        binding.password.setOnClickListener {
            startActivity(Intent(this, PasswordEditActivity::class.java))
        }
        binding.testEdit.setOnClickListener {
//            startActivity(Intent(this, EditActivity::class.java))
        }
        binding.myRecyleView.setOnClickListener {
            startActivity(Intent(this, MyRecycleViewActivity::class.java))
        }
        binding.testLife.setOnClickListener {
            startActivity(Intent(this, ChildrenActivity::class.java))
        }
        binding.deviceInfo.setOnClickListener {
            startActivity(Intent(this, DeviceInfoActivity::class.java))
        }
        binding.rxKotlin.setOnClickListener {
            startActivity(Intent(this, RxKotlinTestActivity::class.java))
        }

        binding.rainImage.setOnClickListener {
            startActivity(Intent(this, RainEmojiActivity::class.java))
        }

        binding.qrCode.setOnClickListener {
            startActivity(Intent(this, QrCodeActivity::class.java))
        }

        binding.btnBanner.setOnClickListener {
            startActivity(Intent(this, BannerActivity::class.java))
        }

        binding.breathLight.setOnClickListener {
            startActivity(Intent(this, BreathLightActivity::class.java))
        }

        binding.btnPictureInPicture.setOnClickListener {
            startActivity(Intent(this, PictureInPictureActivity::class.java))
        }

        binding.testUrl.setOnClickListener {
//            startActivity()
            val dm = resources.displayMetrics
            val width = dm.widthPixels
            val height = dm.heightPixels
            Log.e("AAA", "$width   $height")
        }

    }
}